package com.salon.modules.makeup.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 服务预约
 *
 * @author lch 12345678@qq.com
 * @since 1.0.0 2023-10-10
 */
@Data
@TableName("tb_reservation")
public class ReservationEntity {

    /**
     * 主键
     */
	private Long id;
    /**
     * 用户ID
     */
	private Long userId;
    /**
     * 服务ID
     */
	private Long serviceId;
    /**
     * 预约日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
	private Date reservationDate;
    /**
     * 预约时间
     */
    @DateTimeFormat(pattern = "HH:mm")
    @JsonFormat(pattern = "HH:mm", locale = "zh", timezone = "GMT+8")
	private Date reservationTime;
    /**
     * 预约状态状态
     */
	private Integer status;
    /**
     * 客户留言
     */
	private String note;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 客户姓名
     */
    @TableField(exist = false)
    private String userName;

    /**
     * 服务名称
     */
    @TableField(exist = false)
    private String serviceName;

    /**
     * 服务图片
     */
    @TableField(exist = false)
    private String picUrl;

    /**
     * 优惠价格
     */
    @TableField(exist = false)
    private BigDecimal linePrice;

}